package com.app.mapper.article;

import com.app.domain.bo.article.ArticleBo;
import com.app.domain.po.article.ArticlePo;
import com.app.domain.vo.article.ArticleVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * ArticleMapper
 */
@Repository
public interface ArticleMapper extends BaseMapper<ArticlePo> {

    /**
     * 查询文章列表
     *
     * @param bo 入参
     */
    List<ArticleVo> lists(@Param("bo") ArticleBo bo);

    /**
     * 热门文章
     */
    List<ArticleVo> articleHots();

    //--------------------------------------------------------|↓|删除文章相关数据|↓|----------------------------------------------------------
    //--------------------------------------------------------|↓|删除文章相关数据|↓|----------------------------------------------------------
    //--------------------------------------------------------|↓|删除文章相关数据|↓|----------------------------------------------------------

    //删除文章内容
    void deleteArticleContent(@Param("articleId") Long articleId);

    //删除文章评论
    void deleteArticleComments(@Param("articleId") Long articleId);

    //删除文章标签管理
    void deleteArticleTags(@Param("articleId") Long articleId);

    //删除文章弹幕
    void deleteArticleDanmus(@Param("articleId") Long articleId);

}